﻿namespace Shared.Service.DataPermissions
{
    public static class BaseDataPermissionStateExtension
    {
        public static bool IsNullOrDisable(this BaseDataPermissionState dataPermission)
        {
            return dataPermission.State == DataPermissionState.Null || dataPermission.State == DataPermissionState.Disable;
        }

        public static bool IsAllOrDisable(this BaseDataPermissionState dataPermission)
        {
            return dataPermission.State == DataPermissionState.All || dataPermission.State == DataPermissionState.Disable;
        }
    }
}
